package com.cian.service;

import com.cian.entity.History;
import com.cian.entity.dto.StockDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.List;

@ApiModel(value = "Redis应用对象类")
public interface IRedis {
    @ApiModelProperty(value = "通过服务器的识别码获取库存的信息")
    public List<StockDTO> getStockByCode(String serverCode, int nextPage, int pageMaxNum);
    @ApiModelProperty(value = "通过服务器的识别码作为key，存储库存的信息")
    public boolean setStockByCode(String serverCode, List<StockDTO> list, long timeout);
    @ApiModelProperty(value = "通过商品Id来进行查询，如果成功则返回对于商品的详细信息")
    public StockDTO finderForCoId(String serverCode, int coId);
    @ApiModelProperty(value = "将History对象保存到历史中")
    public boolean setHistory(String account, String serverCode, Date date, History history);
    @ApiModelProperty(value = "从历史中获取History对象")
    public History getHistory(String account, String serverCode, Date date);
}
